<{include file="public/header.html"}>
		<div class="xinsu-right">
			<div class="xinsu-right-content">
				<div class="xinsu-data-content">
					<div class="xinsu-title">
						<span class="layui-breadcrumb">
						  	<a><cite>当前位置</cite></a>
							<a><cite>会员管理</cite></a>
							<a><cite>新增会员</cite></a>
						</span>
					</div>
					<form class="xinsu-form" action="" method="post">
						<table width="100%">
							<tbody>
								<tr class="xinsu-row-title">
									<td colspan="2">账号信息</td>
								</tr>
								<tr class="xinsu-row-ls">
									<td class="xinshu-asterisk" align="right" width="200">所属代理商：</td>
									<td>
										<select name="aid">
											<option value="0">请选择代理</option>
											<{foreach $agent as $key to $val}>
											<option value="<{$val.id}>"  <{if $val.id == $result.aid}>selected<{/if}>><{$val.agent_name}> / <{$val.username}></option>
											<{/foreach}>
									    </select>
									</td>		
								</tr>
								<tr class="xinsu-row-ls">
									<td class="xinshu-asterisk" align="right" width="200">所属员工：</td>
									<td>
										<select name="sid">
									        <option value="0">请选择员工</option>
											<{foreach $staff as $key to $val}>
											<option value="<{$val.id}>" <{if $val.id == $result.sid}>selected<{/if}>><{$val.username}></option>
											<{/foreach}>
									    </select>
									</td>		
								</tr>
								<tr class="xinsu-row-ls">
									<td class="xinshu-asterisk" align="right" width="200">登录账号：</td>
									<td>
										<input type="text" name="username" id="username" value="<{$result.username}>" class="layui-input xinsu-input1">
										<font color="999999">输入范围 3 至 15 位字符，输入完成后系统自动前缀G</font>
									</td>	
								</tr>
								<tr class="xinsu-row-ls">
									<td class="xinshu-asterisk" align="right" width="200">账号昵称：</td>
									<td>
										<input type="text" name="nickname" value="<{$result.nickname}>" class="layui-input xinsu-input1">
										<font color="999999">输入范围 3 至 15 位字符</font>
									</td>	
								</tr>
								<tr class="xinsu-row-ls">
									<td class="xinshu-asterisk" align="right" width="200">登录密码：</td>
									<td>
										<input type="password" name="password" value="" class="layui-input xinsu-input1">
										<font color="999999">输入范围 6 至 12 位字符</font>
									</td>	
								</tr>
								<tr class="xinsu-row-ls">
									<td class="xinshu-asterisk" align="right" width="200">账号类型：</td>
									<td>
										<select name="demo_account">
									        <option value="0">正式</option>
									        <option value="1">试玩</option>
									    </select>
									</td>		
								</tr>
								<tr class="xinsu-row-ls xinsu-row-border">
									<td class="xinshu-asterisk" align="right" width="200">融资融券：</td>
									<td>
										<select name="stock_type">
									        <option value="0">无限制</option>
									        <option value="1" <{if 1 == $result.stock_type}>selected<{/if}>>融资</option>
									        <option value="2" <{if 2 == $result.stock_type}>selected<{/if}>>融券</option>
									    </select>
									</td>		
								</tr>
								<tr class="xinsu-row-title">
									<td colspan="2">业务信息</td>
								</tr>
								<tr class="xinsu-row-ls">
									<td class="xinshu-asterisk" align="right" width="200">买入手续费：</td>
									<td>
										<input type="text" name="buy_fee" value="<{$config_sys.bull_cost}>" class="layui-input xinsu-input1" disabled>
										<font color="999999">0 至 0.003</font>
									</td>	
								</tr>
								<tr class="xinsu-row-ls">
									<td class="xinshu-asterisk" align="right" width="200">卖出手续费：</td>
									<td>
										<input type="text" name="sell_fee" value="<{$config_sys.sell_cost}>" class="layui-input xinsu-input1" disabled>
										<font color="999999">0 至 0.003</font>
									</td>	
								</tr>
								<tr class="xinsu-row-ls">
									<td class="xinshu-asterisk" align="right" width="200">留仓费：</td>
									<td>
										<input type="text" name="save_cost" value="<{$config_sys.save_cost}>" class="layui-input xinsu-input1" disabled>
										<font color="999999">0 至 0.0006/天</font>
									</td>	
								</tr>
								<tr class="xinsu-row-ls">
									<td class="xinshu-asterisk" align="right" width="200">结算费用：</td>
									<td>
										<input type="text" name="manage_cost" value="<{$config_sys.manage_cost}>" class="layui-input xinsu-input1" disabled>
										<font color="999999">0 至 0.002</font>
									</td>	
								</tr>
								<tr class="xinsu-row-ls">
									<td class="xinshu-asterisk" align="right" width="200">印花税：</td>
									<td>
										<input type="text" name="stamp" value="<{$config_sys.stamp}>" class="layui-input xinsu-input1" disabled>
										<font color="999999">0 至 0.001</font>
									</td>	
								</tr>
								<tr class="xinsu-row-ls">
									<td class="xinshu-asterisk" align="right" width="200">最小股数：</td>
									<td>
										<input type="text" name="min_num" value="<{$config_sys.num_min}>" class="layui-input xinsu-input1" disabled>
									</td>	
								</tr>
								<tr class="xinsu-row-ls">
									<td class="xinshu-asterisk" align="right" width="200">最大股数：</td>
									<td>
										<input type="text" name="max_num" value="<{$config_sys.num_max}>" class="layui-input xinsu-input1" disabled>
									</td>	
								</tr>
								<tr class="xinsu-row-ls">
									<td class="xinshu-asterisk" align="right" width="200">融资最小卖出时间：</td>
									<td>
										<input type="text" name="min_time" value="<{$config_sys.sell_min_time}>" class="layui-input xinsu-input1" disabled>
										<font color="999999">分钟</font>
									</td>	
								</tr>
								<tr class="xinsu-row-ls">
									<td class="xinshu-asterisk" align="right" width="200">融券最小卖出时间：</td>
									<td>
										<input type="text" name="rmin_time" value="<{$config_sys.r_sell_min_time}>" class="layui-input xinsu-input1" disabled>
										<font color="999999">分钟</font>
									</td>	
								</tr>
								<tr class="xinsu-row-ls">
									<td class="xinshu-asterisk" align="right" width="200">单笔额度限额：</td>
									<td>
										<input type="text" name="single_limit" value="<{$config_sys.money_max}>" class="layui-input xinsu-input1" disabled>
										<font color="999999">用户下单每笔金额上限</font>
									</td>	
								</tr>
								<tr class="xinsu-row-ls">
									<td class="xinshu-asterisk" align="right" width="200">单股持仓总额上限：</td>
									<td>
										<input type="text" name="upper_limit" value="<{$config_sys.total_max}>" class="layui-input xinsu-input1" disabled>
										<font color="999999">用户每只股票持仓总金额上限</font>
									</td>	
								</tr>
								<tr class="xinsu-row-ls">
									<td class="xinshu-asterisk" align="right" width="200">最高可用额度限制：</td>
									<td>
										<input type="text" name="money_max" value="<{$config_sys.max_can_use}>" class="layui-input xinsu-input1" disabled>
										<font color="999999">用户配资资金上限</font>
									</td>	
								</tr>
								<tr class="xinsu-row-ls">
									<td class="xinshu-asterisk" align="right" width="200">资金倍数：</td>
									<td>
										<input type="text" name="multiple" value="<{$config_sys.cost_exchange_rate}>" class="layui-input xinsu-input1" disabled>
										<font color="999999">倍   资金余额倍数</font>
									</td>	
								</tr>
								<tr class="xinsu-row-ls">
									<td class="xinshu-asterisk" align="right" width="200">是否只能做带R股票：</td>
									<td>
										<input type="radio" name="is_only_rstock" value="0" <{if 0 == $result.is_only_rstock}>checked<{/if}>>
									        无限制	
									    <input type="radio" name="is_only_rstock" value="1" <{if 0 == $result.is_only_rstock}>checked<{/if}>>
									        融资融券股票	
										<font color="999999">带R：融资融券股票</font>
									</td>	
								</tr>
								<tr class="xinsu-row-ls">
									<td class="xinshu-asterisk" align="right" width="200">是否提前禁止建仓：</td>
									<td>
										<input type="radio" name="is_early_jiancang" value="0" <{if 0 == $result.is_early_jiancang}>checked<{/if}>>
									        无限制	
									    <input type="radio" name="is_early_jiancang" value="1" <{if 1 == $result.is_early_jiancang}>checked<{/if}>>
									        禁止	
										<font color="999999">14：58：00 禁止建仓</font>
									</td>	
								</tr>
								<tr class="xinsu-row-title">
									<td colspan="2">基本信息 </td>
								</tr>
								<tr class="xinsu-row-ls">
									<td class="xinshu-asterisk" align="right" width="200">真实姓名：</td>
									<td>
										<input type="text" name="realname" value="<{$result.realname}>" class="layui-input xinsu-input1">
									</td>	
								</tr>
								<tr class="xinsu-row-ls">
									<td class="xinshu-asterisk" align="right" width="200">性别：</td>
									<td>
									    <input type="radio" name="sex" value="男" <{if "男" == $result.sex}>checked<{/if}>>
									        男	
									    <input type="radio" name="sex" value="女" <{if "女" == $result.sex}>checked<{/if}>>
									        女	
									</td>	
								</tr>
								<tr class="xinsu-row-ls">
									<td class="xinshu-asterisk" align="right" width="200">收款银行：</td>
									<td>
										<select name="bank_name">
									        <option value="工商银行" <{if "工商银行" == $result.bank_name}>selected<{/if}>>工商银行</option>
									        <option value="建设银行" <{if "建设银行" == $result.bank_name}>selected<{/if}>>建设银行</option>
									        <option value="中国银行" <{if "中国银行" == $result.bank_name}>selected<{/if}>>中国银行</option>
									        <option value="农业银行" <{if "农业银行" == $result.bank_name}>selected<{/if}>>农业银行</option>
									        <option value="交通银行" <{if "交通银行" == $result.bank_name}>selected<{/if}>>交通银行</option>
									        <option value="浦发银行" <{if "浦发银行" == $result.bank_name}>selected<{/if}>>浦发银行</option>
									        <option value="招商银行" <{if "招商银行" == $result.bank_name}>selected<{/if}>>招商银行</option>
									        <option value="广发银行" <{if "广发银行" == $result.bank_name}>selected<{/if}>>广发银行</option>
									        <option value="光大银行" <{if "光大银行" == $result.bank_name}>selected<{/if}>>光大银行</option>
									        <option value="兴业银行" <{if "兴业银行" == $result.bank_name}>selected<{/if}>>兴业银行</option>
									        <option value="民生银行" <{if "民生银行" == $result.bank_name}>selected<{/if}>>民生银行</option>
									        <option value="中信银行" <{if "中信银行" == $result.bank_name}>selected<{/if}>>中信银行</option>
									        <option value="邮政储蓄" <{if "邮政储蓄" == $result.bank_name}>selected<{/if}>>邮政储蓄</option>
									        <option value="华夏银行" <{if "华夏银行" == $result.bank_name}>selected<{/if}>>华夏银行</option>
									        <option value="平安银行" <{if "平安银行" == $result.bank_name}>selected<{/if}>>平安银行</option>
									        <option value="郑州银行" <{if "郑州银行" == $result.bank_name}>selected<{/if}>>郑州银行</option>
									    </select>
									</td>	
								</tr>
								<tr class="xinsu-row-ls">
									<td class="xinshu-asterisk" align="right" width="200">开户行(支行名称)：</td>
									<td>
										<input type="text" name="bank_address" value="<{$result.bank_address}>" class="layui-input xinsu-input1">
									</td>	
								</tr>
								<tr class="xinsu-row-ls">
									<td class="xinshu-asterisk" align="right" width="200">银行账号：</td>
									<td>
										<input type="text" name="bank_code" value="<{$result.bank_code}>" class="layui-input xinsu-input1">
									</td>	
								</tr>
								<tr class="xinsu-row-ls">
									<td class="xinshu-asterisk" align="right" width="200">手机号码：</td>
									<td>
										<input type="text" name="mobile" value="<{$result.mobile}>" class="layui-input xinsu-input1">
									</td>	
								</tr>
								<tr class="xinsu-row-ls">
									<td class="xinshu-asterisk" align="right" width="200">取款密码：</td>
									<td>
										<input type="text" name="atmpwd" value="" class="layui-input xinsu-input1">
									</td>	
								</tr>
							</tbody>
						</table>
						<button class="layui-btn xinsu-btn xinsu-btn3" type="submit">提交</button>
						<button class="layui-btn xinsu-btn xinsu-btn2" type="reset">重置</button>
					</form>
				</div>
			</div>
		</div>
		<script>
			$("select[name='aid']").change(function(){
				var url = "/agent/ajax_get_staff";
				var aid = $(this).val();
				http_request_post(url, {aid:aid}, ajax_get_staff_callback);
			})
			$("#username").blur(function() {
				var txt=$(this).val();
				if(txt.indexOf("G")=="-1"){
					$(this).val("G"+txt);
				}
			});
			function ajax_get_staff_callback(result) {
				$("select[name='sid']").html("");
				html = '<option value="0">请选择员工</option>';
				if (result.status == 1) {
					var res = eval(result.data);
					$.each(res, function(key, val){
						html += '<option value="'+val.id+'">'+val.username+'</option>';
					})
				}
				$("select[name='sid']").html(html);
			}
		</script>
<{include file="public/footer.html"}>